﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Taobao.Top.Api.Domain
{
    public class PurchaseOrder:BaseObject
    {
        #region Ctor

        public PurchaseOrder()
            : base()
        { 
        }

        #endregion

        #region Properties

        [XmlElement("supplier_from")]
        public string SupplierFrom
        {
            get;
            set;
        }

        [XmlElement("supplier_username")]
        public string SupplierUserName
        {
            get;
            set;
        }

        [XmlElement("distributor_from")]
        public string DistributorFrom
        {
            get;
            set;
        }

        [XmlElement("distributor_username")]
        public string DistributorUserName
        {
            get;
            set;
        }

        [XmlElement("buyer_nick")]
        public string BuyerNick
        {
            get;
            set;
        }

        [XmlElement("type")]
        public string Type
        {
            get;
            set;
        }

        [XmlElement("created")]
        public string Created
        {
            get;
            set;
        }

        [XmlElement("id")]
        public long ID
        {
            get;
            set;
        }

        [XmlElement("distributor_memo")]
        public string DistributorMemo
        {
            get;
            set;
        }

        [XmlElement("alipay_no")]
        public long AlipayNo
        {
            get;
            set;
        }

        [XmlElement("total_fee")]
        public float TotalFee
        {
            get;
            set;
        }

        [XmlElement("post_fee")]
        public float PostFee
        {
            get;
            set;
        }

        [XmlElement("distributor_payment")]
        public float DistributorPayment
        {
            get;
            set;
        }

        [XmlElement("snapshot_url")]
        public string SnapShotUrl
        {
            get;
            set;
        }

        [XmlElement("status")]
        public string Status
        {
            get;
            set;
        }

        [XmlElement("pay_time")]
        public string PayTime
        {
            get;
            set;
        }

        [XmlElement("consign_time")]
        public string ConSignTime
        {
            get;
            set;
        }

        [XmlElement("modified") ]
        public string Modified
        {
            get;
            set;
        }
         
        [XmlArray("sub_purchase_orders")]
        [XmlArrayItem("sub_purchase_order")]
        public List<SubPurchaseOrder> SubPurchaseOrders
        {
            get;
            set;
        }

        [XmlElement("receiver")]
        public Receiver Receiver
        {
            get;
            set;
        }
        #endregion
    }
}
